package com.lxk.ums.domain.bo;

import com.lxk.ums.domain.UmsUserAddress;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;

/**
 * 用户收货地址业务对象 ums_user_address
 *
 * @author soda
 * @date 2024-07-11
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = UmsUserAddress.class, reverseConvertGenerate = false)
public class UmsUserAddressBo extends BaseEntity {

    /**
     * id
     */
    @NotNull(message = "id不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 用户id
     */
    @NotNull(message = "用户id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long userId;

    /**
     * 经度
     */
    private BigDecimal longitude;

    /**
     * 纬度
     */
    private BigDecimal latitude;

    /**
     * 收货人姓名
     */
    @NotBlank(message = "收货人姓名不能为空", groups = { AddGroup.class, EditGroup.class })
    private String realName;

    /**
     * 收货人电话
     */
    @NotBlank(message = "收货人电话不能为空", groups = { AddGroup.class, EditGroup.class })
    private String phone;

    /**
     * 收货人所在省ID
     */
    @NotNull(message = "收货人所在省ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long provinceId;

    /**
     * 收货人所在省
     */
    @NotBlank(message = "收货人所在省不能为空", groups = { AddGroup.class, EditGroup.class })
    private String province;

    /**
     * 收货人所在城市ID
     */
    @NotNull(message = "收货人所在城市ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long cityId;

    /**
     * 收货人所在市
     */
    @NotBlank(message = "收货人所在市不能为空", groups = { AddGroup.class, EditGroup.class })
    private String city;

    /**
     * 收货人所在区ID
     */
    @NotNull(message = "收货人所在区ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long districtId;

    /**
     * 收货人所在区
     */
    @NotBlank(message = "收货人所在区不能为空", groups = { AddGroup.class, EditGroup.class })
    private String district;

    /**
     * 收货人详细地址
     */
    @NotBlank(message = "收货人详细地址不能为空", groups = { AddGroup.class, EditGroup.class })
    private String detail;

    /**
     * 是否默认 0否 1是
     */
    @NotNull(message = "是否默认 0否 1是不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer defaultStatus;

    /**
     * 街道
     */
    @NotBlank(message = "街道不能为空", groups = { AddGroup.class, EditGroup.class })
    private String street;


}
